package cn.edu.hqu.cst.android.cxy.test2;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;

public class UC1 extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_uc1);
        Button button11 = findViewById(R.id.button11);
        Button button12 = findViewById(R.id.button12);
        Button button13 = findViewById(R.id.button13);
        Button button14 = findViewById(R.id.button14);
        LinearLayout UC1 = findViewById(R.id.uc1);
        button11.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                UC1.setOrientation(LinearLayout.HORIZONTAL);
                UC1.setGravity(9);
            }
        });
        button12.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                UC1.setOrientation(LinearLayout.VERTICAL);
                UC1.setGravity(9);
            }
        });
        button13.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                UC1.setOrientation(LinearLayout.VERTICAL);
                UC1.setGravity(3);
            }
        });
        button14.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent i = new Intent(cn.edu.hqu.cst.android.cxy.test2.UC1.this , MainActivity.class);
                startActivity(i);
            }
        });
    }
}